#include "stdafx.h"
#include "delimblock.h"

Retour DelimBlock::evaluer(map<string, Var_T> *loc, map<string, Var_T> *glob)
{
	Retour ret;
	ret.code = this->type;
	return ret;
}

DelimBlock::~DelimBlock() {};

Instruction* delimiter(list<token> src)
{
	DelimBlock *db = new DelimBlock();
	
	if (src.front().tok == "{") {
		db->type = RET_BLOCKBEGIN;
		db->code = CODE_BLOCKBEGIN;
	} else if (src.front().tok == "}") {
		db->type = RET_BLOCKEND;
		db->code = CODE_BLOCKEND;
	} else {
		die("Logically impossible state.");
	}

	return db;
}
